import request from '@/utils/request'

export function getTenantIdRole(tenantId) {
  return request({
    url: `/api/security/role?tenantId=${tenantId}`,
    method: 'get'
  })
}

export function postRole(data) {
  return request({
    url: `/api/security/role`,
    method: 'post',
    data
  })
}

export function deleteRole(roleId) {
  return request({
    url: `/api/security/role/${roleId}?roleId=${roleId}`,
    method: 'delete'
  })
}

export function getRole(roleId) {
  return request({
    url: `/api/security/role/${roleId}`,
    method: 'get'
  })
}

export function putRole(roleId,data) {
  return request({
    url: `/api/security/role/${roleId}?roleId=${roleId}`,
    method: 'put',
    data
  })
}